package cn.aws360.boot.extend.sms.api.exception;

import cn.aws360.boot.base.api.exception.enums.AbstractExceptionEnum;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

import static cn.aws360.boot.extend.sms.api.constant.SmsConstant.MODULE_SMS_CODE;
import static cn.aws360.boot.extend.sms.api.constant.SmsConstant.MODULE_SMS_NAME;

/**
 * @author junnan
 */
@Getter
@RequiredArgsConstructor
public enum SmsExceptionEnum implements AbstractExceptionEnum {

    /**
     * 短信模块
     */
    SMS_NOT_SEND_FOR_BLANK(MODULE_SMS_NAME, MODULE_SMS_CODE + "11", "手机为空不能发送!"),
    SMS_NOT_SEND_FOR_EXPIRE(MODULE_SMS_NAME, MODULE_SMS_CODE + "12", "验证码有效不用发送!"),

    SMS_NOT_SEND_FOR_CONFIG_ERROR(MODULE_SMS_NAME, MODULE_SMS_CODE + "21", "短信配置有误不能发送"),

    SMS_SEND_ERROR_FOR_ALIBABA(MODULE_SMS_NAME, MODULE_SMS_CODE + "51", "阿里短信发送错误!"),
    SMS_SEND_ERROR_FOR_TENCENT(MODULE_SMS_NAME, MODULE_SMS_CODE + "61", "腾讯短信发送错误!"),

    ;

    private final String module;
    private final String errCode;
    private final String userTip;

}